<?php

class Damages_Methods_Request_GetPermissions extends Damages_Methods_Request {

  public function process() {
    if (!Damages_Auth::getInstance()->checkPermission(Damages_Auth::PERMISSION_ADMIN))
      throw new Damages_Exception_App(Damages_Codes::ACCESS_DENIED);
    $response = new Damages_Methods_Response_GetPermissions(true);
    $response->setPermissions();
    return $response;
  }

}